//
//  TestSearchViewController.m
//  ProjectDemo
//
//  Created by IOS3 on 2018/10/29.
//  Copyright © 2018 IOS3. All rights reserved.
//

#import "TestSearchViewController.h"
#import <UIViewController+HBD.h>


@interface TestSearchViewController () <UISearchBarDelegate>

@end

@implementation TestSearchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UISearchBar *bar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 200, 35)];
    bar.placeholder = @"ghjklkjhg";
    bar.delegate = self;
    
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = UIColor.grayColor;
    view.frame = CGRectMake(0, 0, 100, 30);
    
    
    
//    self.navigationController.navigationItem.titleView = view;
    self.navigationItem.titleView = bar;
    
    CGFloat r, g, b;
    [[UIColor redColor] getRed:&r green:&g blue:&b alpha:nil];
    UIColor *color = [UIColor colorWithRed:1.0 - r green:1.0 - g blue:1.0 - b alpha:1];
    UIView *view2 = [[UIView alloc] init];
    view2.frame = CGRectMake(100, 100, 100, 100);
    view2.backgroundColor = color;
    [self.view addSubview:view2];
    
    
    
}


- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar;
{
    
}


@end
